//防抖
const shake = (handler,time)=>{
    let timer = null 
    return function()
    {
        clearTimeout(timer)
        
             timer=setTimeout(()=>{
                handler.call(this,...arguments)
                timer=null
             },time)
        
    }
}

export default shake